import { useRoute } from 'vue-router';
import useTabs from './useTabs';
import router from '@/router';

export default function usePage () {
  const route = useRoute();
  const useTab = useTabs();
  const { id } = route.query;
  (id && typeof id === 'string') && useTab.setTaskIdList(id);

  const handlePageBack = () => {
    router.push({
      path: '/dimensioning/project'
    })
  }

  return {
    ...useTab,
    handlePageBack
  }
}
